using GameFrame.Deterministic;
using System;
using System.Runtime.InteropServices;

namespace GameFrame
{
    [Serializable]
    [StructLayout(LayoutKind.Explicit)]
    public struct Transform2DVertical : IComponent
    {
        public const int SIZE = 16;
        [FieldOffset(0)]
        public FP Position;
        [FieldOffset(8)]
        public FP Height;

        public static unsafe void Serialize(void* ptr, FrameSerializer serializer)
        {
            Transform2DVertical* transform2DverticalPtr = (Transform2DVertical*) ptr;
            FP.Serialize((void*) &transform2DverticalPtr->Height, (IDeterministicFrameSerializer) serializer);
            FP.Serialize((void*) &transform2DverticalPtr->Position, (IDeterministicFrameSerializer) serializer);
        }
    }
}